#pragma once

#include <dinput.h>
#include <queue>

class Controls
{
protected:
	Controls(void);
	static Controls * controlsInstance;
public:
	static Controls * Instance();	

	virtual ~Controls(void);

	void Initialise(HINSTANCE hInstance, HWND hWnd);

	void CaptureKeys(void);
	void ClearKeys();

	BYTE GetPressedKey();
	
public:
	BYTE currentKeys[256];    // public for easy access (i know use setters and getters)
	BYTE previosKeys[256];

	//BYTE pressedKeys[256]; //TODO: probably only needs to be an array of bool
	std::deque<BYTE> pressedKeys;

protected:
	LPDIRECTINPUT8 din;    // the pointer to our DirectInput interface
	LPDIRECTINPUTDEVICE8 dinkeyboard;    // the pointer to the keyboard device
};
